home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Developer Toolbox 6.1
/
SGI Developer Toolbox 6.1 - Disc 1.iso
/
toolbox
/
src
/
exampleCode
/
opengl
/
GLUT
/
progs
/
examples
/
stereo.c
< prev
next >
Wrap
C/C++ Source or Header
|
1996-11-11
|
808b
|
33 lines
/* Copyright (c) Mark J. Kilgard, 1994. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#include <stdlib.h>
#include <stdio.h>
#include <GL/glut.h>
void
display(void)
{
glDrawBuffer(GL_BACK_LEFT);
glClearColor(1.0, 0.0, 0.0, 1.0); /* red */
glClear(GL_COLOR_BUFFER_BIT);
glDrawBuffer(GL_BACK_RIGHT);
glClearColor(0.0, 0.0, 1.0, 1.0); /* blue */
glClear(GL_COLOR_BUFFER_BIT);
}
int
main(int argc, char **argv)
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_STEREO);
glutCreateWindow("stereo example");
glutDisplayFunc(display);
glutMainLoop();
return 0; /* ANSI C requires main to return int. */
}